//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS GreengrassV2 service.
///
/// IoT Greengrass brings local compute, messaging, data management, sync, and ML inference capabilities to edge devices. This enables devices to collect and analyze data closer to the source of information, react autonomously to local events, and communicate securely with each other on local networks. Local devices can also communicate securely with Amazon Web Services IoT Core and export IoT data to the Amazon Web Services Cloud. IoT Greengrass developers can use Lambda functions and components to create and deploy applications to fleets of edge devices for local operation. IoT Greengrass Version 2 provides a new major version of the IoT Greengrass Core software, new APIs, and a new console. Use this API reference to learn how to use the IoT Greengrass V2 API operations to manage components, manage deployments, and core devices. For more information, see What is IoT Greengrass? in the IoT Greengrass V2 Developer Guide.
public struct GreengrassV2: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the GreengrassV2 client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "GreengrassV2",
            serviceIdentifier: "greengrass",
            serviceProtocol: .restjson,
            apiVersion: "2020-11-30",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            variantEndpoints: Self.variantEndpoints,
            errorType: GreengrassV2ErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "dataplane-us-gov-east-1": "greengrass-ats.iot.us-gov-east-1.amazonaws.com",
        "dataplane-us-gov-west-1": "greengrass-ats.iot.us-gov-west-1.amazonaws.com"
    ]}


    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "ca-central-1": "greengrass-fips.ca-central-1.amazonaws.com",
            "us-east-1": "greengrass-fips.us-east-1.amazonaws.com",
            "us-east-2": "greengrass-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "greengrass.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "greengrass.us-gov-west-1.amazonaws.com",
            "us-west-2": "greengrass-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. The role must include the AWSGreengrassResourceAccessRolePolicy managed policy or a custom policy that defines equivalent permissions for the IoT Greengrass features that you use. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    @Sendable
    @inlinable
    public func associateServiceRoleToAccount(_ input: AssociateServiceRoleToAccountRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AssociateServiceRoleToAccountResponse {
        try await self.client.execute(
            operation: "AssociateServiceRoleToAccount", 
            path: "/greengrass/servicerole", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates a Greengrass service role with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. The role must include the AWSGreengrassResourceAccessRolePolicy managed policy or a custom policy that defines equivalent permissions for the IoT Greengrass features that you use. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    ///
    /// Parameters:
    ///   - roleArn: The Amazon Resource Name (ARN) of the service role to associate with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region.
    ///   - logger: Logger use during operation
    @inlinable
    public func associateServiceRoleToAccount(
        roleArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AssociateServiceRoleToAccountResponse {
        let input = AssociateServiceRoleToAccountRequest(
            roleArn: roleArn
        )
        return try await self.associateServiceRoleToAccount(input, logger: logger)
    }

    /// Associates a list of client devices with a core device. Use this API operation to specify which client devices can discover a core device through cloud discovery. With cloud discovery, client devices connect to IoT Greengrass to retrieve associated core devices' connectivity information and certificates. For more information, see Configure cloud discovery in the IoT Greengrass V2 Developer Guide.  Client devices are local IoT devices that connect to and communicate with an IoT Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to Amazon Web Services IoT Core and interact with client devices in Greengrass components. For more information, see Interact with local IoT devices in the IoT Greengrass V2 Developer Guide.
    @Sendable
    @inlinable
    public func batchAssociateClientDeviceWithCoreDevice(_ input: BatchAssociateClientDeviceWithCoreDeviceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchAssociateClientDeviceWithCoreDeviceResponse {
        try await self.client.execute(
            operation: "BatchAssociateClientDeviceWithCoreDevice", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}/associateClientDevices", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Associates a list of client devices with a core device. Use this API operation to specify which client devices can discover a core device through cloud discovery. With cloud discovery, client devices connect to IoT Greengrass to retrieve associated core devices' connectivity information and certificates. For more information, see Configure cloud discovery in the IoT Greengrass V2 Developer Guide.  Client devices are local IoT devices that connect to and communicate with an IoT Greengrass core device over MQTT. You can connect client devices to a core device to sync MQTT messages and data to Amazon Web Services IoT Core and interact with client devices in Greengrass components. For more information, see Interact with local IoT devices in the IoT Greengrass V2 Developer Guide.
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - entries: The list of client devices to associate.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchAssociateClientDeviceWithCoreDevice(
        coreDeviceThingName: String,
        entries: [AssociateClientDeviceWithCoreDeviceEntry]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchAssociateClientDeviceWithCoreDeviceResponse {
        let input = BatchAssociateClientDeviceWithCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName, 
            entries: entries
        )
        return try await self.batchAssociateClientDeviceWithCoreDevice(input, logger: logger)
    }

    /// Disassociates a list of client devices from a core device. After you disassociate a client device from a core device, the client device won't be able to use cloud discovery to retrieve the core device's connectivity information and certificates.
    @Sendable
    @inlinable
    public func batchDisassociateClientDeviceFromCoreDevice(_ input: BatchDisassociateClientDeviceFromCoreDeviceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchDisassociateClientDeviceFromCoreDeviceResponse {
        try await self.client.execute(
            operation: "BatchDisassociateClientDeviceFromCoreDevice", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}/disassociateClientDevices", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disassociates a list of client devices from a core device. After you disassociate a client device from a core device, the client device won't be able to use cloud discovery to retrieve the core device's connectivity information and certificates.
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - entries: The list of client devices to disassociate.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchDisassociateClientDeviceFromCoreDevice(
        coreDeviceThingName: String,
        entries: [DisassociateClientDeviceFromCoreDeviceEntry]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchDisassociateClientDeviceFromCoreDeviceResponse {
        let input = BatchDisassociateClientDeviceFromCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName, 
            entries: entries
        )
        return try await self.batchDisassociateClientDeviceFromCoreDevice(input, logger: logger)
    }

    /// Cancels a deployment. This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change anything for that device.
    @Sendable
    @inlinable
    public func cancelDeployment(_ input: CancelDeploymentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CancelDeploymentResponse {
        try await self.client.execute(
            operation: "CancelDeployment", 
            path: "/greengrass/v2/deployments/{deploymentId}/cancel", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Cancels a deployment. This operation cancels the deployment for devices that haven't yet received it. If a device already received the deployment, this operation doesn't change anything for that device.
    ///
    /// Parameters:
    ///   - deploymentId: The ID of the deployment.
    ///   - logger: Logger use during operation
    @inlinable
    public func cancelDeployment(
        deploymentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CancelDeploymentResponse {
        let input = CancelDeploymentRequest(
            deploymentId: deploymentId
        )
        return try await self.cancelDeployment(input, logger: logger)
    }

    /// Creates a component. Components are software that run on Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to IoT Greengrass. Then, you can deploy the component to other core devices. You can use this operation to do the following:    Create components from recipes  Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see IoT Greengrass component recipe reference in the IoT Greengrass V2 Developer Guide. To create a component from a recipe, specify inlineRecipe when you call this operation.    Create components from Lambda functions  Create a component from an Lambda function that runs on IoT Greengrass. This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from IoT Greengrass V1 to IoT Greengrass V2. This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. IoT Greengrass doesn't apply any additional restrictions on deprecated Lambda runtime versions. To create a component from a Lambda function, specify lambdaFunction when you call this operation.  IoT Greengrass currently supports Lambda functions on only Linux core devices.
    @Sendable
    @inlinable
    public func createComponentVersion(_ input: CreateComponentVersionRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateComponentVersionResponse {
        try await self.client.execute(
            operation: "CreateComponentVersion", 
            path: "/greengrass/v2/createComponentVersion", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a component. Components are software that run on Greengrass core devices. After you develop and test a component on your core device, you can use this operation to upload your component to IoT Greengrass. Then, you can deploy the component to other core devices. You can use this operation to do the following:    Create components from recipes  Create a component from a recipe, which is a file that defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform capability. For more information, see IoT Greengrass component recipe reference in the IoT Greengrass V2 Developer Guide. To create a component from a recipe, specify inlineRecipe when you call this operation.    Create components from Lambda functions  Create a component from an Lambda function that runs on IoT Greengrass. This creates a recipe and artifacts from the Lambda function's deployment package. You can use this operation to migrate Lambda functions from IoT Greengrass V1 to IoT Greengrass V2. This function accepts Lambda functions in all supported versions of Python, Node.js, and Java runtimes. IoT Greengrass doesn't apply any additional restrictions on deprecated Lambda runtime versions. To create a component from a Lambda function, specify lambdaFunction when you call this operation.  IoT Greengrass currently supports Lambda functions on only Linux core devices.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent.  Idempotency means that the request is successfully processed only once, even if you send the request multiple times.  When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service  returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for  idempotent requests for up to 8 hours.
    ///   - inlineRecipe: The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility. You must specify either inlineRecipe or lambdaFunction.
    ///   - lambdaFunction: The parameters to create a component from a Lambda function. You must specify either inlineRecipe or lambdaFunction.
    ///   - tags: A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func createComponentVersion(
        clientToken: String? = CreateComponentVersionRequest.idempotencyToken(),
        inlineRecipe: AWSBase64Data? = nil,
        lambdaFunction: LambdaFunctionRecipeSource? = nil,
        tags: [String: String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateComponentVersionResponse {
        let input = CreateComponentVersionRequest(
            clientToken: clientToken, 
            inlineRecipe: inlineRecipe, 
            lambdaFunction: lambdaFunction, 
            tags: tags
        )
        return try await self.createComponentVersion(input, logger: logger)
    }

    /// Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, IoT Greengrass deploys that group's deployment to the new device. You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. IoT Greengrass applies the new deployment to the target devices. Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment. For more information, see the Create deployments in the IoT Greengrass V2 Developer Guide.
    @Sendable
    @inlinable
    public func createDeployment(_ input: CreateDeploymentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDeploymentResponse {
        try await self.client.execute(
            operation: "CreateDeployment", 
            path: "/greengrass/v2/deployments", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a continuous deployment for a target, which is a Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, IoT Greengrass deploys that group's deployment to the new device. You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. IoT Greengrass applies the new deployment to the target devices. Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment. For more information, see the Create deployments in the IoT Greengrass V2 Developer Guide.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive identifier that you can provide to ensure that the request is idempotent.  Idempotency means that the request is successfully processed only once, even if you send the request multiple times.  When a request succeeds, and you specify the same client token for subsequent successful requests, the IoT Greengrass V2 service  returns the successful response that it caches from the previous request. IoT Greengrass V2 caches successful responses for  idempotent requests for up to 8 hours.
    ///   - components: The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
    ///   - deploymentName: The name of the deployment.
    ///   - deploymentPolicies: The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
    ///   - iotJobConfiguration: The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
    ///   - parentTargetArn: The parent deployment's target ARN within a subdeployment.
    ///   - tags: A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.
    ///   - targetArn: The ARN of the target IoT thing or thing group. When creating a subdeployment, the targetARN can only be a thing group.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDeployment(
        clientToken: String? = CreateDeploymentRequest.idempotencyToken(),
        components: [String: ComponentDeploymentSpecification]? = nil,
        deploymentName: String? = nil,
        deploymentPolicies: DeploymentPolicies? = nil,
        iotJobConfiguration: DeploymentIoTJobConfiguration? = nil,
        parentTargetArn: String? = nil,
        tags: [String: String]? = nil,
        targetArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDeploymentResponse {
        let input = CreateDeploymentRequest(
            clientToken: clientToken, 
            components: components, 
            deploymentName: deploymentName, 
            deploymentPolicies: deploymentPolicies, 
            iotJobConfiguration: iotJobConfiguration, 
            parentTargetArn: parentTargetArn, 
            tags: tags, 
            targetArn: targetArn
        )
        return try await self.createDeployment(input, logger: logger)
    }

    /// Deletes a version of a component from IoT Greengrass.  This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.
    @Sendable
    @inlinable
    public func deleteComponent(_ input: DeleteComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteComponent", 
            path: "/greengrass/v2/components/{arn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a version of a component from IoT Greengrass.  This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.
    ///
    /// Parameters:
    ///   - arn: The ARN of the component version.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteComponent(
        arn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteComponentRequest(
            arn: arn
        )
        return try await self.deleteComponent(input, logger: logger)
    }

    /// Deletes a Greengrass core device, which is an IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the IoT thing. For more information about how to delete the IoT thing, see DeleteThing in the IoT API Reference.
    @Sendable
    @inlinable
    public func deleteCoreDevice(_ input: DeleteCoreDeviceRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteCoreDevice", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a Greengrass core device, which is an IoT thing. This operation removes the core device from the list of core devices. This operation doesn't delete the IoT thing. For more information about how to delete the IoT thing, see DeleteThing in the IoT API Reference.
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteCoreDevice(
        coreDeviceThingName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName
        )
        return try await self.deleteCoreDevice(input, logger: logger)
    }

    /// Deletes a deployment. To delete an active deployment, you must first cancel it. For more information, see CancelDeployment. Deleting a deployment doesn't affect core devices that run that deployment, because core devices store the deployment's configuration on the device. Additionally, core devices can roll back to a previous deployment that has been deleted.
    @Sendable
    @inlinable
    public func deleteDeployment(_ input: DeleteDeploymentRequest, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteDeployment", 
            path: "/greengrass/v2/deployments/{deploymentId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a deployment. To delete an active deployment, you must first cancel it. For more information, see CancelDeployment. Deleting a deployment doesn't affect core devices that run that deployment, because core devices store the deployment's configuration on the device. Additionally, core devices can roll back to a previous deployment that has been deleted.
    ///
    /// Parameters:
    ///   - deploymentId: The ID of the deployment.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDeployment(
        deploymentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteDeploymentRequest(
            deploymentId: deploymentId
        )
        return try await self.deleteDeployment(input, logger: logger)
    }

    /// Retrieves metadata for a version of a component.
    @Sendable
    @inlinable
    public func describeComponent(_ input: DescribeComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeComponentResponse {
        try await self.client.execute(
            operation: "DescribeComponent", 
            path: "/greengrass/v2/components/{arn}/metadata", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves metadata for a version of a component.
    ///
    /// Parameters:
    ///   - arn: The ARN of the component version.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeComponent(
        arn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeComponentResponse {
        let input = DescribeComponentRequest(
            arn: arn
        )
        return try await self.describeComponent(input, logger: logger)
    }

    /// Disassociates the Greengrass service role from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. Without a service role, IoT Greengrass can't verify the identity of client devices or manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    @Sendable
    @inlinable
    public func disassociateServiceRoleFromAccount(_ input: DisassociateServiceRoleFromAccountRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DisassociateServiceRoleFromAccountResponse {
        try await self.client.execute(
            operation: "DisassociateServiceRoleFromAccount", 
            path: "/greengrass/servicerole", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Disassociates the Greengrass service role from IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. Without a service role, IoT Greengrass can't verify the identity of client devices or manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func disassociateServiceRoleFromAccount(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DisassociateServiceRoleFromAccountResponse {
        let input = DisassociateServiceRoleFromAccountRequest(
        )
        return try await self.disassociateServiceRoleFromAccount(input, logger: logger)
    }

    /// Gets the recipe for a version of a component.
    @Sendable
    @inlinable
    public func getComponent(_ input: GetComponentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetComponentResponse {
        try await self.client.execute(
            operation: "GetComponent", 
            path: "/greengrass/v2/components/{arn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the recipe for a version of a component.
    ///
    /// Parameters:
    ///   - arn: The ARN of the component version.
    ///   - recipeOutputFormat: The format of the recipe.
    ///   - logger: Logger use during operation
    @inlinable
    public func getComponent(
        arn: String,
        recipeOutputFormat: RecipeOutputFormat? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetComponentResponse {
        let input = GetComponentRequest(
            arn: arn, 
            recipeOutputFormat: recipeOutputFormat
        )
        return try await self.getComponent(input, logger: logger)
    }

    /// Gets the pre-signed URL to download a public or a Lambda component artifact. Core devices call this operation to identify the URL that they can use to download an artifact to install.
    @Sendable
    @inlinable
    public func getComponentVersionArtifact(_ input: GetComponentVersionArtifactRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetComponentVersionArtifactResponse {
        try await self.client.execute(
            operation: "GetComponentVersionArtifact", 
            path: "/greengrass/v2/components/{arn}/artifacts/{artifactName+}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the pre-signed URL to download a public or a Lambda component artifact. Core devices call this operation to identify the URL that they can use to download an artifact to install.
    ///
    /// Parameters:
    ///   - arn: The ARN of the component version. Specify the ARN of a public or a Lambda component version.
    ///   - artifactName: The name of the artifact. You can use the GetComponent operation to download the component recipe, which includes the URI of the artifact. The artifact name is the section of the URI after the scheme. For example, in the artifact URI greengrass:SomeArtifact.zip, the artifact name is SomeArtifact.zip.
    ///   - iotEndpointType: Determines if the Amazon S3 URL returned is a FIPS pre-signed URL endpoint.  Specify fips if you want the returned Amazon S3 pre-signed URL to point to  an Amazon S3 FIPS endpoint. If you don't specify a value, the default is standard.
    ///   - s3EndpointType: Specifies the endpoint to use when getting Amazon S3 pre-signed URLs. All Amazon Web Services Regions except US East (N. Virginia) use REGIONAL in all cases. In the US East (N. Virginia) Region the default is GLOBAL, but you can change it to REGIONAL with this parameter.
    ///   - logger: Logger use during operation
    @inlinable
    public func getComponentVersionArtifact(
        arn: String,
        artifactName: String,
        iotEndpointType: IotEndpointType? = nil,
        s3EndpointType: S3EndpointType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetComponentVersionArtifactResponse {
        let input = GetComponentVersionArtifactRequest(
            arn: arn, 
            artifactName: artifactName, 
            iotEndpointType: iotEndpointType, 
            s3EndpointType: s3EndpointType
        )
        return try await self.getComponentVersionArtifact(input, logger: logger)
    }

    /// Retrieves connectivity information for a Greengrass core device. Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API, IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide.
    @Sendable
    @inlinable
    public func getConnectivityInfo(_ input: GetConnectivityInfoRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetConnectivityInfoResponse {
        try await self.client.execute(
            operation: "GetConnectivityInfo", 
            path: "/greengrass/things/{thingName}/connectivityInfo", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves connectivity information for a Greengrass core device. Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API, IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide.
    ///
    /// Parameters:
    ///   - thingName: The name of the core device. This is also the name of the IoT thing.
    ///   - logger: Logger use during operation
    @inlinable
    public func getConnectivityInfo(
        thingName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetConnectivityInfoResponse {
        let input = GetConnectivityInfoRequest(
            thingName: thingName
        )
        return try await self.getConnectivityInfo(input, logger: logger)
    }

    /// Retrieves metadata for a Greengrass core device.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   When the status of any component on the core device becomes BROKEN    At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    @Sendable
    @inlinable
    public func getCoreDevice(_ input: GetCoreDeviceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetCoreDeviceResponse {
        try await self.client.execute(
            operation: "GetCoreDevice", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves metadata for a Greengrass core device.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   When the status of any component on the core device becomes BROKEN    At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - logger: Logger use during operation
    @inlinable
    public func getCoreDevice(
        coreDeviceThingName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetCoreDeviceResponse {
        let input = GetCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName
        )
        return try await self.getCoreDevice(input, logger: logger)
    }

    /// Gets a deployment. Deployments define the components that run on Greengrass core devices.
    @Sendable
    @inlinable
    public func getDeployment(_ input: GetDeploymentRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDeploymentResponse {
        try await self.client.execute(
            operation: "GetDeployment", 
            path: "/greengrass/v2/deployments/{deploymentId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets a deployment. Deployments define the components that run on Greengrass core devices.
    ///
    /// Parameters:
    ///   - deploymentId: The ID of the deployment.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDeployment(
        deploymentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDeploymentResponse {
        let input = GetDeploymentRequest(
            deploymentId: deploymentId
        )
        return try await self.getDeployment(input, logger: logger)
    }

    /// Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    @Sendable
    @inlinable
    public func getServiceRoleForAccount(_ input: GetServiceRoleForAccountRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetServiceRoleForAccountResponse {
        try await self.client.execute(
            operation: "GetServiceRoleForAccount", 
            path: "/greengrass/servicerole", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the service role associated with IoT Greengrass for your Amazon Web Services account in this Amazon Web Services Region. IoT Greengrass uses this role to verify the identity of client devices and manage core device connectivity information. For more information, see Greengrass service role in the IoT Greengrass Version 2 Developer Guide.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getServiceRoleForAccount(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetServiceRoleForAccountResponse {
        let input = GetServiceRoleForAccountRequest(
        )
        return try await self.getServiceRoleForAccount(input, logger: logger)
    }

    /// Retrieves a paginated list of client devices that are associated with a core device.
    @Sendable
    @inlinable
    public func listClientDevicesAssociatedWithCoreDevice(_ input: ListClientDevicesAssociatedWithCoreDeviceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListClientDevicesAssociatedWithCoreDeviceResponse {
        try await self.client.execute(
            operation: "ListClientDevicesAssociatedWithCoreDevice", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}/associatedClientDevices", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of client devices that are associated with a core device.
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listClientDevicesAssociatedWithCoreDevice(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListClientDevicesAssociatedWithCoreDeviceResponse {
        let input = ListClientDevicesAssociatedWithCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listClientDevicesAssociatedWithCoreDevice(input, logger: logger)
    }

    /// Retrieves a paginated list of all versions for a component. Greater versions are listed first.
    @Sendable
    @inlinable
    public func listComponentVersions(_ input: ListComponentVersionsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListComponentVersionsResponse {
        try await self.client.execute(
            operation: "ListComponentVersions", 
            path: "/greengrass/v2/components/{arn}/versions", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of all versions for a component. Greater versions are listed first.
    ///
    /// Parameters:
    ///   - arn: The ARN of the component.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listComponentVersions(
        arn: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListComponentVersionsResponse {
        let input = ListComponentVersionsRequest(
            arn: arn, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listComponentVersions(input, logger: logger)
    }

    /// Retrieves a paginated list of component summaries. This list includes components that you have permission to view.
    @Sendable
    @inlinable
    public func listComponents(_ input: ListComponentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListComponentsResponse {
        try await self.client.execute(
            operation: "ListComponents", 
            path: "/greengrass/v2/components", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of component summaries. This list includes components that you have permission to view.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - scope: The scope of the components to list. Default: PRIVATE
    ///   - logger: Logger use during operation
    @inlinable
    public func listComponents(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        scope: ComponentVisibilityScope? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListComponentsResponse {
        let input = ListComponentsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            scope: scope
        )
        return try await self.listComponents(input, logger: logger)
    }

    /// Retrieves a paginated list of Greengrass core devices.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the status of any component on the core device becomes ERRORED or BROKEN.   For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the status of any component on the core device becomes ERRORED, BROKEN, RUNNING, or FINISHED.   At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    @Sendable
    @inlinable
    public func listCoreDevices(_ input: ListCoreDevicesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListCoreDevicesResponse {
        try await self.client.execute(
            operation: "ListCoreDevices", 
            path: "/greengrass/v2/coreDevices", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of Greengrass core devices.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the status of any component on the core device becomes ERRORED or BROKEN.   For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the status of any component on the core device becomes ERRORED, BROKEN, RUNNING, or FINISHED.   At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - runtime: The runtime to be used by the core device. The runtime can be:    aws_nucleus_classic     aws_nucleus_lite
    ///   - status: The core device status by which to filter. If you specify this parameter, the list includes only core devices that have this status. Choose one of the following options:    HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.    UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.
    ///   - thingGroupArn: The ARN of the IoT thing group by which to filter. If you specify this parameter, the list includes only core devices that have successfully deployed a deployment that targets the thing group. When you remove a core device from a thing group, the list continues to include that core device.
    ///   - logger: Logger use during operation
    @inlinable
    public func listCoreDevices(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        runtime: String? = nil,
        status: CoreDeviceStatus? = nil,
        thingGroupArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListCoreDevicesResponse {
        let input = ListCoreDevicesRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            runtime: runtime, 
            status: status, 
            thingGroupArn: thingGroupArn
        )
        return try await self.listCoreDevices(input, logger: logger)
    }

    /// Retrieves a paginated list of deployments.
    @Sendable
    @inlinable
    public func listDeployments(_ input: ListDeploymentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDeploymentsResponse {
        try await self.client.execute(
            operation: "ListDeployments", 
            path: "/greengrass/v2/deployments", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of deployments.
    ///
    /// Parameters:
    ///   - historyFilter: The filter for the list of deployments. Choose one of the following options:    ALL – The list includes all deployments.    LATEST_ONLY – The list includes only the latest revision of each deployment.   Default: LATEST_ONLY
    ///   - maxResults: The maximum number of results to be returned per paginated request. Default: 50
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - parentTargetArn: The parent deployment's target ARN within a subdeployment.
    ///   - targetArn: The ARN of the target IoT thing or thing group.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDeployments(
        historyFilter: DeploymentHistoryFilter? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        parentTargetArn: String? = nil,
        targetArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDeploymentsResponse {
        let input = ListDeploymentsRequest(
            historyFilter: historyFilter, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            parentTargetArn: parentTargetArn, 
            targetArn: targetArn
        )
        return try await self.listDeployments(input, logger: logger)
    }

    /// Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.
    @Sendable
    @inlinable
    public func listEffectiveDeployments(_ input: ListEffectiveDeploymentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListEffectiveDeploymentsResponse {
        try await self.client.execute(
            operation: "ListEffectiveDeployments", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}/effectiveDeployments", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of deployment jobs that IoT Greengrass sends to Greengrass core devices.
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - logger: Logger use during operation
    @inlinable
    public func listEffectiveDeployments(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListEffectiveDeploymentsResponse {
        let input = ListEffectiveDeploymentsRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listEffectiveDeployments(input, logger: logger)
    }

    /// Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   When the status of any component on the core device becomes BROKEN    At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    @Sendable
    @inlinable
    public func listInstalledComponents(_ input: ListInstalledComponentsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListInstalledComponentsResponse {
        try await self.client.execute(
            operation: "ListInstalledComponents", 
            path: "/greengrass/v2/coreDevices/{coreDeviceThingName}/installedComponents", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. To include dependencies in the response, set the topologyFilter parameter to ALL.  IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated. Core devices send status updates at the following times:   When the IoT Greengrass Core software starts   When the core device receives a deployment from the Amazon Web Services Cloud   When the status of any component on the core device becomes BROKEN    At a regular interval that you can configure, which defaults to 24 hours   For IoT Greengrass Core v2.7.0, the core device sends status updates upon local deployment and cloud deployment
    ///
    /// Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - nextToken: The token to be used for the next set of paginated results.
    ///   - topologyFilter: The filter for the list of components. Choose from the following options:    ALL – The list includes all components installed on the core device.    ROOT – The list includes only root components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components.   Default: ROOT
    ///   - logger: Logger use during operation
    @inlinable
    public func listInstalledComponents(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        topologyFilter: InstalledComponentTopologyFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListInstalledComponentsResponse {
        let input = ListInstalledComponentsRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            topologyFilter: topologyFilter
        )
        return try await self.listInstalledComponents(input, logger: logger)
    }

    /// Retrieves the list of tags for an IoT Greengrass resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the list of tags for an IoT Greengrass resource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Retrieves a list of components that meet the component, version, and platform requirements of a deployment. Greengrass core devices call this operation when they receive a deployment to identify the components to install. This operation identifies components that meet all dependency requirements for a deployment. If the requirements conflict, then this operation returns an error and the deployment fails. For example, this occurs if component A requires version >2.0.0 and component B requires version  of a component dependency. When you specify the component candidates to resolve, IoT Greengrass compares each component's digest from the core device with the component's digest in the Amazon Web Services Cloud. If the digests don't match, then IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.  To use this operation, you must use the data plane API endpoint and authenticate with an IoT device certificate. For more information, see IoT Greengrass endpoints and quotas.
    @Sendable
    @inlinable
    public func resolveComponentCandidates(_ input: ResolveComponentCandidatesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ResolveComponentCandidatesResponse {
        try await self.client.execute(
            operation: "ResolveComponentCandidates", 
            path: "/greengrass/v2/resolveComponentCandidates", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves a list of components that meet the component, version, and platform requirements of a deployment. Greengrass core devices call this operation when they receive a deployment to identify the components to install. This operation identifies components that meet all dependency requirements for a deployment. If the requirements conflict, then this operation returns an error and the deployment fails. For example, this occurs if component A requires version >2.0.0 and component B requires version  of a component dependency. When you specify the component candidates to resolve, IoT Greengrass compares each component's digest from the core device with the component's digest in the Amazon Web Services Cloud. If the digests don't match, then IoT Greengrass specifies to use the version from the Amazon Web Services Cloud.  To use this operation, you must use the data plane API endpoint and authenticate with an IoT device certificate. For more information, see IoT Greengrass endpoints and quotas.
    ///
    /// Parameters:
    ///   - componentCandidates: The list of components to resolve.
    ///   - platform: The platform to use to resolve compatible components.
    ///   - logger: Logger use during operation
    @inlinable
    public func resolveComponentCandidates(
        componentCandidates: [ComponentCandidate]? = nil,
        platform: ComponentPlatform? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ResolveComponentCandidatesResponse {
        let input = ResolveComponentCandidatesRequest(
            componentCandidates: componentCandidates, 
            platform: platform
        )
        return try await self.resolveComponentCandidates(input, logger: logger)
    }

    /// Adds tags to an IoT Greengrass resource. If a tag already exists for the resource, this operation updates the tag's value.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds tags to an IoT Greengrass resource. If a tag already exists for the resource, this operation updates the tag's value.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource to tag.
    ///   - tags: A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes a tag from an IoT Greengrass resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{resourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a tag from an IoT Greengrass resource.
    ///
    /// Parameters:
    ///   - resourceArn: The ARN of the resource to untag.
    ///   - tagKeys: A list of keys for tags to remove from the resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates connectivity information for a Greengrass core device. Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API, IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide.
    @Sendable
    @inlinable
    public func updateConnectivityInfo(_ input: UpdateConnectivityInfoRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateConnectivityInfoResponse {
        try await self.client.execute(
            operation: "UpdateConnectivityInfo", 
            path: "/greengrass/things/{thingName}/connectivityInfo", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates connectivity information for a Greengrass core device. Connectivity information includes endpoints and ports where client devices can connect to an MQTT broker on the core device. When a client device calls the IoT Greengrass discovery API, IoT Greengrass returns connectivity information for all of the core devices where the client device can connect. For more information, see Connect client devices to core devices in the IoT Greengrass Version 2 Developer Guide.
    ///
    /// Parameters:
    ///   - connectivityInfo: The connectivity information for the core device.
    ///   - thingName: The name of the core device. This is also the name of the IoT thing.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateConnectivityInfo(
        connectivityInfo: [ConnectivityInfo],
        thingName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateConnectivityInfoResponse {
        let input = UpdateConnectivityInfoRequest(
            connectivityInfo: connectivityInfo, 
            thingName: thingName
        )
        return try await self.updateConnectivityInfo(input, logger: logger)
    }
}

extension GreengrassV2 {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: GreengrassV2, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension GreengrassV2 {
    /// Return PaginatorSequence for operation ``listClientDevicesAssociatedWithCoreDevice(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listClientDevicesAssociatedWithCoreDevicePaginator(
        _ input: ListClientDevicesAssociatedWithCoreDeviceRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListClientDevicesAssociatedWithCoreDeviceRequest, ListClientDevicesAssociatedWithCoreDeviceResponse> {
        return .init(
            input: input,
            command: self.listClientDevicesAssociatedWithCoreDevice,
            inputKey: \ListClientDevicesAssociatedWithCoreDeviceRequest.nextToken,
            outputKey: \ListClientDevicesAssociatedWithCoreDeviceResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listClientDevicesAssociatedWithCoreDevice(_:logger:)``.
    ///
    /// - Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listClientDevicesAssociatedWithCoreDevicePaginator(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListClientDevicesAssociatedWithCoreDeviceRequest, ListClientDevicesAssociatedWithCoreDeviceResponse> {
        let input = ListClientDevicesAssociatedWithCoreDeviceRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults
        )
        return self.listClientDevicesAssociatedWithCoreDevicePaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listComponentVersions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentVersionsPaginator(
        _ input: ListComponentVersionsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListComponentVersionsRequest, ListComponentVersionsResponse> {
        return .init(
            input: input,
            command: self.listComponentVersions,
            inputKey: \ListComponentVersionsRequest.nextToken,
            outputKey: \ListComponentVersionsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listComponentVersions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - arn: The ARN of the component.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentVersionsPaginator(
        arn: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListComponentVersionsRequest, ListComponentVersionsResponse> {
        let input = ListComponentVersionsRequest(
            arn: arn, 
            maxResults: maxResults
        )
        return self.listComponentVersionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentsPaginator(
        _ input: ListComponentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListComponentsRequest, ListComponentsResponse> {
        return .init(
            input: input,
            command: self.listComponents,
            inputKey: \ListComponentsRequest.nextToken,
            outputKey: \ListComponentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - scope: The scope of the components to list. Default: PRIVATE
    ///   - logger: Logger used for logging
    @inlinable
    public func listComponentsPaginator(
        maxResults: Int? = nil,
        scope: ComponentVisibilityScope? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListComponentsRequest, ListComponentsResponse> {
        let input = ListComponentsRequest(
            maxResults: maxResults, 
            scope: scope
        )
        return self.listComponentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listCoreDevices(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listCoreDevicesPaginator(
        _ input: ListCoreDevicesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListCoreDevicesRequest, ListCoreDevicesResponse> {
        return .init(
            input: input,
            command: self.listCoreDevices,
            inputKey: \ListCoreDevicesRequest.nextToken,
            outputKey: \ListCoreDevicesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listCoreDevices(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - runtime: The runtime to be used by the core device. The runtime can be:    aws_nucleus_classic     aws_nucleus_lite
    ///   - status: The core device status by which to filter. If you specify this parameter, the list includes only core devices that have this status. Choose one of the following options:    HEALTHY – The IoT Greengrass Core software and all components run on the core device without issue.    UNHEALTHY – The IoT Greengrass Core software or a component is in a failed state on the core device.
    ///   - thingGroupArn: The ARN of the IoT thing group by which to filter. If you specify this parameter, the list includes only core devices that have successfully deployed a deployment that targets the thing group. When you remove a core device from a thing group, the list continues to include that core device.
    ///   - logger: Logger used for logging
    @inlinable
    public func listCoreDevicesPaginator(
        maxResults: Int? = nil,
        runtime: String? = nil,
        status: CoreDeviceStatus? = nil,
        thingGroupArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListCoreDevicesRequest, ListCoreDevicesResponse> {
        let input = ListCoreDevicesRequest(
            maxResults: maxResults, 
            runtime: runtime, 
            status: status, 
            thingGroupArn: thingGroupArn
        )
        return self.listCoreDevicesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDeployments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDeploymentsPaginator(
        _ input: ListDeploymentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDeploymentsRequest, ListDeploymentsResponse> {
        return .init(
            input: input,
            command: self.listDeployments,
            inputKey: \ListDeploymentsRequest.nextToken,
            outputKey: \ListDeploymentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDeployments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - historyFilter: The filter for the list of deployments. Choose one of the following options:    ALL – The list includes all deployments.    LATEST_ONLY – The list includes only the latest revision of each deployment.   Default: LATEST_ONLY
    ///   - maxResults: The maximum number of results to be returned per paginated request. Default: 50
    ///   - parentTargetArn: The parent deployment's target ARN within a subdeployment.
    ///   - targetArn: The ARN of the target IoT thing or thing group.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDeploymentsPaginator(
        historyFilter: DeploymentHistoryFilter? = nil,
        maxResults: Int? = nil,
        parentTargetArn: String? = nil,
        targetArn: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDeploymentsRequest, ListDeploymentsResponse> {
        let input = ListDeploymentsRequest(
            historyFilter: historyFilter, 
            maxResults: maxResults, 
            parentTargetArn: parentTargetArn, 
            targetArn: targetArn
        )
        return self.listDeploymentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listEffectiveDeployments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listEffectiveDeploymentsPaginator(
        _ input: ListEffectiveDeploymentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListEffectiveDeploymentsRequest, ListEffectiveDeploymentsResponse> {
        return .init(
            input: input,
            command: self.listEffectiveDeployments,
            inputKey: \ListEffectiveDeploymentsRequest.nextToken,
            outputKey: \ListEffectiveDeploymentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listEffectiveDeployments(_:logger:)``.
    ///
    /// - Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listEffectiveDeploymentsPaginator(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListEffectiveDeploymentsRequest, ListEffectiveDeploymentsResponse> {
        let input = ListEffectiveDeploymentsRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults
        )
        return self.listEffectiveDeploymentsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listInstalledComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listInstalledComponentsPaginator(
        _ input: ListInstalledComponentsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListInstalledComponentsRequest, ListInstalledComponentsResponse> {
        return .init(
            input: input,
            command: self.listInstalledComponents,
            inputKey: \ListInstalledComponentsRequest.nextToken,
            outputKey: \ListInstalledComponentsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listInstalledComponents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - coreDeviceThingName: The name of the core device. This is also the name of the IoT thing.
    ///   - maxResults: The maximum number of results to be returned per paginated request.
    ///   - topologyFilter: The filter for the list of components. Choose from the following options:    ALL – The list includes all components installed on the core device.    ROOT – The list includes only root components, which are components that you specify in a deployment. When you choose this option, the list doesn't include components that the core device installs as dependencies of other components.   Default: ROOT
    ///   - logger: Logger used for logging
    @inlinable
    public func listInstalledComponentsPaginator(
        coreDeviceThingName: String,
        maxResults: Int? = nil,
        topologyFilter: InstalledComponentTopologyFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListInstalledComponentsRequest, ListInstalledComponentsResponse> {
        let input = ListInstalledComponentsRequest(
            coreDeviceThingName: coreDeviceThingName, 
            maxResults: maxResults, 
            topologyFilter: topologyFilter
        )
        return self.listInstalledComponentsPaginator(input, logger: logger)
    }
}

extension GreengrassV2.ListClientDevicesAssociatedWithCoreDeviceRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListClientDevicesAssociatedWithCoreDeviceRequest {
        return .init(
            coreDeviceThingName: self.coreDeviceThingName,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension GreengrassV2.ListComponentVersionsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListComponentVersionsRequest {
        return .init(
            arn: self.arn,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension GreengrassV2.ListComponentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListComponentsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            scope: self.scope
        )
    }
}

extension GreengrassV2.ListCoreDevicesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListCoreDevicesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            runtime: self.runtime,
            status: self.status,
            thingGroupArn: self.thingGroupArn
        )
    }
}

extension GreengrassV2.ListDeploymentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListDeploymentsRequest {
        return .init(
            historyFilter: self.historyFilter,
            maxResults: self.maxResults,
            nextToken: token,
            parentTargetArn: self.parentTargetArn,
            targetArn: self.targetArn
        )
    }
}

extension GreengrassV2.ListEffectiveDeploymentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListEffectiveDeploymentsRequest {
        return .init(
            coreDeviceThingName: self.coreDeviceThingName,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension GreengrassV2.ListInstalledComponentsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> GreengrassV2.ListInstalledComponentsRequest {
        return .init(
            coreDeviceThingName: self.coreDeviceThingName,
            maxResults: self.maxResults,
            nextToken: token,
            topologyFilter: self.topologyFilter
        )
    }
}
